#lang rosetta-racket


(provide sphere-of-cones)


(define (cone-sph r h φ θ)
  (cone (sph h φ θ) r u0))

(define (sphere-of-cones r h n)
  (flatten
   (for/list ((θ (: < 0 .. (/ 2pi n) .. pi >)))
     (for/list ((φ (: < 0 .. (/ 2pi n) .. 2pi >)))
       (cone-sph (+ r (* r (sin θ))) h φ θ)))))